﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Comissoes.Models.FornecedoresModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Index</title>
    <!-- CSS -->
    <link rel="stylesheet" type="text/css" href="../../Content/Site.css" />
    <link rel="stylesheet" type="text/css" href="../../Content/Form.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/plugins/jquery-ui-1.8/css/smoothness/jquery-ui-1.8.5.custom.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/plugins/jquery-jqGrid-3.7.2/css/ui.jqgrid.css" />
    <!-- JS Default -->
    <script type="text/javascript" src="../../Scripts/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="../../Scripts/Default.js"></script>
    <script type="text/javascript" src="../../Scripts/Extension.js"></script>
    <!-- JS Plugins -->
    <script type="text/javascript" src="../../Scripts/plugins/jquery-ui-1.8/js/jquery-ui-1.8.5.custom.min.js"></script>
    <script type="text/javascript" src="../../Scripts/plugins/jquery-jqGrid-3.7.2/js/i18n/grid.locale-pt-br.js"></script>
    <script type="text/javascript" src="../../Scripts/plugins/jquery-jqGrid-3.7.2/js/jquery.jqGrid.min.js"></script>
</head>
<body>
    <div class="cabecalho ui-state-highlight">
        <span class="icolst" />
        <span class="txt">
            <%= Html.Encode("Edição de Fornecedores") %>
        </span>
    </div>
    <form action="javascript:saveDialog('Fornecedores', $('#COD_FORN').val())">
        <fieldset class="container transparent">
            <label class="input160">
                <button class="diskcommand" type="submit"">Salvar</button>
                <% if (Model.fornecedor.COD_FORN == 0)
                   { %>                    
                    <button class="closecommand" type="button" onclick="loadOption('/Fornecedores/Index', true);">Cancelar</button>
                <% }
                   else
                   { %>
                    <button class="closecommand" type="button" onclick="loadOption('/Fornecedores/Details/<%= Html.Encode(Model.fornecedor.COD_FORN) %>', true);">Cancelar</button>
                <% } %>
            </label>
        </fieldset>
        <fieldset class="container field520 border ui-widget-content ui-corner-all">
            <% if (Model.fornecedor.COD_FORN == 0)
               { %>
                <%= Html.Hidden("COD_FORN", 0) %>
            <% }
               else
               { %>
                <%= Html.Label("COD_FORN", "for80", "Código:") %>
                <%= Html.LabelInput(Html.TextBox("COD_FORN"), "input80 right integer setfocus") %>
            <% } %>

            <%= Html.Label("ATIVO_FORN", "for20 right", "Ativa") %>
            <label class="space"></label>
            <%= Html.LabelInput(Html.CheckBox("ATIVO_FORN", Model.fornecedor.ATIVO_FORN == "A" || Model.fornecedor.ATIVO_FORN == null), "Check") %>

            <% Html.RenderAction("Edit", "Pessoas", Model.fornecedor.PESSOAS); %>
        </fieldset>
    <% Html.EndForm(); %>
</body>
</html>